⟸ Go Back ⟸
Exercise 7 (Homework 3).
(pumping lemma, diagonalization, hard exercise)

Approximations of real numbers

Given a real number r\in [0,1), let L_r \subseteq \{0,1\}^* be the language consisting of non-empty words w, where w coincides with the first |w| digits of the binary expansion of r. For instance,

  1. Show that L_r is a regular language if and only if r is a rational number.
  2. Argue why for almost all real numbers r\in [0,1), L_r is not a regular language.